package com.example.demo.Common;

public class StringTools {
    public  static String  StringSub(String val,int maxLength){
        if(val==null||maxLength<=0){
            return val;
        }
        if(val.length()>maxLength){
            return val.substring(0,maxLength);
        }
        return val;
    }
}
